package core.actions;

import java.awt.Point;

import core.*;
import core.units.Unit;
import core.weapons.Laser;


public class FireLaser extends Action {
	
	public FireLaser(){
		super();
		name="Laser";
		imageName="iconLaser.png";
		color = ActionConstants.attackColor;
		nameChar='L';
		needDir=true;
		dirRes=2;
		energyCost=20;
		value=180;
		reset();
	}
	
	public void execute(){
		//Player master = PlayerIdHandler.getPlayer(masterId);
		main.attacks.add(new Laser(inputDir, 0.02, master));
		//Point sourcePoint = master.getHero().getPoint();
		//Point targetPoint = new Point(sourcePoint.x+(int)(Math.cos(inputDir*2*Math.PI)*1000), sourcePoint.y+(int)(Math.sin(inputDir*2*Math.PI)*1000));
		//core.world.Wall w = new core.world.Wall(sourcePoint, targetPoint);
		System.out.println("Laser Fired");
		//hasDir=false;
	}
}